<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <style>
        [v-cloak] {
            display: none;
        }

        html,
        body {
            background-color: #FEFEFE;
            padding: 0;
            margin: 0；
        }

        .content-container {
            padding: 10px 2vw;
            background-color: #FEFEFE;
            display: flex;
            flex-direction: row;
            align-items: center;
            flex-wrap: wrap;
        }

        .post-item {
            width: 44vw;
            height: auto;
            margin: 10px 2vw;
            border-radius: 5px;
            box-shadow: 0px 0px 8px #999;
        }

        .post-item .post-uper{
            height: 50px;
            width: 100%;
            background-color: #FEFEFE;
            border-top-left-radius: 5px;
            border-top-right-radius: 5px;
        }
        .avatar{
            height: 36px;
            width: 36px;
            margin: 5px;
            float: left;
            border-radius: 50%;
            border: 2px solid #ddd;
        }
        .uname{
            height: 50px;
            line-height: 50px;
            font-size: 16px;
            color: #515151;
            overflow:hidden;
            text-overflow:ellipsis;
            white-space:nowrap
        }

        .post-item .post-img {
            width: 100%;
            height: 120px;
            background-repeat: no-repeat;
            background-position: center 0;
            background-size: cover;
        }

        .post-item .post-intro {
            border-bottom-left-radius: 5px;
            border-bottom-right-radius: 5px;
            border-left: 3px solid #F4D03F;
            background-color: #fff;
        }

        .post-item .post-intro .post-time {
            padding: 5px 10px 10px;
            color: #808080;
            font-size: 12px;
        }

        .post-item .post-intro .post-name {
            height: 36px;
            padding: 10px 10px 4px;
            color: #515151;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            line-height: 20px;
            font-size: 14px;
        }
        /*没有数据，正在加载*/

        .loading {
            text-align: center;
            padding-top: 10px;
            padding-bottom: 10px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .loading img {
            height: 40px;
            width: 40px;
            animation: que 1.6s linear infinite;
        }

        @keyframes que {
            0% {
                transform: rotate(0deg);
            }
            100% {
                transform: rotate(360deg);
            }
        }
    </style>
</head>

<body>

    <div id="app" v-cloak>

        <div class="content-container">

            <div class="post-item" v-for="item in postsList" @click="goVideoPlay(item.id,item.title)">
                <div class="post-uper">
                    <img :src="getAvatar(item.uqq)" alt="" class="avatar">
                    <div class="uname">{{item.uname}}</div>
                </div>
                <div class="post-img" :style="getImgUrl(item.content)"></div>
                <div class="post-intro">
                    <div class="post-name">{{item.title}}</div>
                    <div class="post-time">{{item.time}}</div>
                </div>
            </div>

        </div>

        <!-- 提示数据为空图片 -->
        <div class="tips" style="text-align:center;" v-if="postsList === null">
            <img src="../image/empty.png" style="width:200px;height:160px;margin-top:20px;" alt="">
            <p style="font-size:14px;color:#999;">空空如也</p>
        </div>
        <!-- 提示网络错误图片 -->
        <div class="tips" style="text-align:center;margin-bottom:20px;" v-show="isError" @click="reload">
            <img src="../image/error.png" style="width:200px;height:160px;margin-top:20px;" alt="">
            <p style="font-size:14px;color:#999;">喔！出错啦，点我重试</p>
        </div>
        <!-- 加载图标 -->
        <div class='loading' v-show="loading">
            <img src='../image/loading.png'>
        </div>

    </div>

    <script src="../script/vendors/api.js"></script>
    <script src="../script/vendors/vue.min.js"></script>
    <script src="../script/vendors/axios.min.js"></script>
    <script src="../script/vendors/md5.min.js"></script>
    <script src="../script/dist/frame3.js"></script>
</body>

</html>
